var http=require("http");
var path=require("path");
var fs=require("fs");
http.createServer((req,res)=>{
    res.writeHead(200,{"Content-Type":"text/html"});
    var filePath=path.join(__dirname+'/cloud.png');
    var pathBuf=fs.readFileSync(filePath);
    var dataUri=pathBuf.toString('base64');
    res.write("<!DOCTYPE html><html><head></head><body>"+
    "<img src='data:image/png;base64,"+dataUri+"'/></body></html>");
}).listen(8081);
console.log("server is listening 8081");